home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Skunkware 5
/
Skunkware 5.iso
/
etc
/
vinegar
(
.txt
)
< prev
Wrap
Microsoft Windows Help File Content
|
1994-08-05
|
2KB
|
63 lines
# vinegar - script to remove the symbolic links created by spray in
# /usr/lib/X11 and /usr/skunk in order to be able to run the software
# provided on the SCO Skunkware CD-ROM
# Written 05-Aug-94 by rr@sco.com
# Usage : vinegar <mount-point>
# Where <mount-point> is the directory on which the CD-ROM is mounted
# If mounted on /usr/skunk, no argument is necessary
usage() {
echo "Usage: vinegar [mount-point]"
echo "\tWhere mount-point refers to the directory on which"
echo "\tthe CD-ROM is mounted. If no arguments are given, it"
echo "\tis assumed the CD-ROM is mounted on /usr/skunk."
exit 1
Remove_Symlink() {
ls -l $1 | grep $MOUNT_PT > /dev/null && rm -f $1
[ $# = 0 ] && MOUNT_PT=/usr/skunk
[ $# = 1 ] && MOUNT_PT=$1
[ $# -gt 1 ] && usage
# check to see if the user has root privelege
fuid=`id`
uid=`echo $fuid | awk ' { print $1 } '`
[ "$uid" = "uid=0(root)" ] || {
echo "You must have root priveleges to run vinegar."
usage
exit 1
# check to make sure the cd is mounted and what we expect is there
[ -f $MOUNT_PT/pics/README ] || usage
[ -d $MOUNT_PT/lib/X11/app-defaults ] || usage
APPDEFDIR=/usr/lib/X11/app-defaults
SKUNKLIST="CONTENTS DIRS.LIST INSTALL.NOTES LINKS.LIST README RELEASE.NOTES \
audio bin custom etc games include info interviews lib man pics \
src tls usr xc"
# clean up the X11 app-defaults directory
[ -d $APPDEFDIR ] && {
cd $APPDEFDIR
for i in $MOUNT_PT/lib/X11/app-defaults/*
[ "$i" = "$MOUNT_PT/lib/X11/app-defaults/XMcd" ] && continue
Remove_Symlink `basename $i`
done
CHAPPDEFDIR=/usr/lib/charm/app-defaults
# clean up the Charm app-defaults directory
[ -d $CHAPPDEFDIR ] && {
cd $CHAPPDEFDIR
for i in $MOUNT_PT/lib/charm/app-defaults/*
Remove_Symlink `basename $i`
done
STARTUPDIR=/usr/lib/X11/sco/startup
# clean up the SCO startup directory
[ -d $STARTUPDIR ] && {
cd $STARTUPDIR
for i in $MOUNT_PT/lib/X11/sco/startup/*
Remove_Symlink `basename $i`
done
# clean up the Interviews directory
Remove_Symlink /interviews
# set up directory links in /usr/local/lib (for now)
LOCALLIBDIRS="g++include gcc-lib povray sc-6.21 xboing/levels xc xconq"
LOCALLIBFILS="libg++.a"
for i in $LOCALLIBDIRS
Remove_Symlink /usr/local/lib/$i
for i in $LOCALLIBFILS
Remove_Symlink /usr/local/lib/$i